#! /usr/bin/python3
import sys
import itertools
for l in sys.stdin:
    l = l.strip()
    p = l[0]
    fs = l[1:]
    for c in itertools.combinations(fs, 2):
        print(c[0] + c[1], p)
